<div class="box">
  <?php if ($heading_text) { ?>
  <div <?php echo $class['box_heading'];?>><?php echo $heading_text; ?></div>
  <?php } ?>
  <div <?php echo $class['box_content'];?>>
    <div <?php echo $class['box_category'];?>>
      <?php foreach ($categories as $category) { ?>
      <div>
        <?php if ($category['thumb']) { ?>
        <div class="image"><a href="<?php echo $category['href']; ?>"><img src="<?php echo $category['thumb']; ?>" alt="<?php echo $category['name']; ?>" /></a></div>
        <?php } ?>
        <div class="name"><a href="<?php echo $category['href']; ?>"><?php echo $category['name']; ?></a></div>
      </div><div style="clear: both;"></div>
      <?php } ?>
      <div style="clear: both;"></div>
    </div>
  </div><div style="clear: both;"></div>
</div>
